if __name__ == '__main__':
    sum = 5  # 2 + 3
    primes = [3]
    i = 5
    while i < 2000000:
        flag = 1
        for j in primes:
            if j > int(pow(i, 0.5)):
                break
            if i % j == 0:
                flag = 0
        if flag == 1:
            sum += i
            primes.append(i)
        i += 2
        # print(i)
    print(sum)
    # 142913828922
